# Maintainer: Remi Gacogne <rgacogne@archlinux.org>
# Contributor: Vladimir Tsanev <tsachev@gmail.com>

pkgname=hiredis
pkgver=1.1.0
pkgrel=1
pkgdesc='Minimalistic C client library for Redis'
arch=('loong64' 'x86_64')
url="https://github.com/redis/hiredis/"
license=('BSD')
depends=('glibc')
checkdepends=('redis')
source=(https://github.com/redis/$pkgname/archive/v$pkgver/hiredis-$pkgver.tar.gz)
sha256sums=('fe6d21741ec7f3fc9df409d921f47dfc73a4d8ff64f4ac6f1d95f951bf7f53d6')

build() {
  cd $pkgname-$pkgver
  make PREFIX=/usr
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" PREFIX=/usr install

  install -Dm 644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
